﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DataShow.ascx
{
    public partial class numberupdown : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public void SetEnableMode(bool mode)
        {
            this.txt_number.Enabled = mode;
            
        }

        #region 获得文本框中的数值
        /// <summary>
        /// 获得文本框中的数值
        /// </summary>
        /// <returns></returns>
        public double GetNumber()
        {
            return Convert.ToDouble(txt_number.Text.Trim());
        }

        public void SetNumber(string number)
        {
            txt_number.Text = number;
        }
        #endregion
    }
}